﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SportsPlatform.PermissionManagement.IPermissionManagement;
using SportsPlatform.Base;
using SportsPlatform.Consts;
using SportsPlatform.Query.PermissionManagement.OperationInfo;
using SportsPlatform.Model.PermissionManagement;
using SportsPlatform.Query.PermissionManagement.BaseQuery;
using SportsPlatform.Dto.PermissionManagement.OperationInfo;
using Abp.Application.Services;
using Microsoft.AspNetCore.Http;
using SportsPlatform.Global;
using Abp.Domain.Repositories;

namespace SportsPlatform.PermissionManagement.PermissionManagement
{
    /// <summary>
    /// 功能操作表
    /// </summary>
    [RemoteService(false)]  //隐藏自动生成的WebApi
    public class OperationInfoService : SportsPlatformAppServiceBase, IOperationInfoService
    {

        private readonly IRepository<OperationInfo, Guid> _operRepository;
        public OperationInfoService(IRepository<OperationInfo, Guid> operRepository,
            IHttpContextAccessor context) : base(context)
        {
            _operRepository = operRepository;
        }

        /// <summary>
        /// 新增信息
        /// </summary>
        /// <param name="addOperationInfoQuery"></param>
        /// <returns></returns>
        public async Task<BaseResultDto> AddOperationInfo(AddOperationInfoQuery addOperationInfoQuery)
        {
            BaseResultDto basePage = new BaseResultDto();
            try
            {
            }
            catch (Exception e)
            {
                basePage.Code = HttpResultCode.Error;
                basePage.Message = e.Message.ToString();
            }
            return basePage;
        }

        /// <summary>
        /// 根据Id删除
        /// </summary>
        /// <param name="deleteOrQueryModel"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public async Task<BaseResultDto> DeleteOperationInfo(DeleteOrGetModelQuery deleteOrQueryModel)
        {
            BaseResultDto basePage = new BaseResultDto();
            try
            {
                var token = UldAdminSessionContext.GetCurrentUserInfo(_context);

                
            }
            catch (Exception e)
            {
                basePage.Code = HttpResultCode.Error;
                basePage.Message = e.Message.ToString();
            }
            return basePage;
        }

        /// <summary>
        /// 根据Id查询
        /// </summary>
        /// <param name="deleteOrQueryModel"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public async Task<ResultDto<GetOperationInfoDto>> GetOperationInfo(DeleteOrGetModelQuery deleteOrQueryModel)
        {
            ResultDto<GetOperationInfoDto> pageData = new ResultDto<GetOperationInfoDto>();
            pageData.Code = HttpResultCode.SqlError;
            try
            {
               
            }
            catch (Exception e)
            {
                pageData.Code = HttpResultCode.Error;
                pageData.Message = e.Message.ToString();
            }
            return pageData;
        }

        /// <summary>
        /// 获取信息List
        /// </summary>
        /// <param name="getOperationInfoQuery"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public async Task<ResultListDto<GetOperationInfoDto>> GetOperationInfoList(GetOperationInfoQuery getOperationInfoQuery)
        {
            ResultListDto<GetOperationInfoDto> resultListDto = new ResultListDto<GetOperationInfoDto>();
            resultListDto.Code = HttpResultCode.SqlError;
            try
            {
                
            }
            catch (Exception e)
            {
                resultListDto.Code = HttpResultCode.Error;
                resultListDto.Message = e.Message.ToString();
            }
            return resultListDto;
        }

        /// <summary>
        /// 是否启用
        /// </summary>
        /// <param name="isStatesModel"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public async Task<BaseResultDto> IsStatesOperationInfo(IsStatesdModel isStatesModel)
        {
            BaseResultDto basePage = new BaseResultDto();
            try
            {
               
            }
            catch (Exception e)
            {
                basePage.Code = HttpResultCode.Error;
                basePage.Message = e.Message.ToString();
            }
            return basePage;
        }

        /// <summary>
        /// 更新信息
        /// </summary>
        /// <param name="updateOperationInfoQuery"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        public async Task<BaseResultDto> UpdateOperationInfo(UpdateOperationInfoQuery updateOperationInfoQuery)
        {
            BaseResultDto basePage = new BaseResultDto();
            try
            {
               
            }
            catch (Exception e)
            {
                basePage.Code = HttpResultCode.Error;
                basePage.Message = e.Message.ToString();
            }
            return basePage;
        }
    }
}
